<%--
  Created by IntelliJ IDEA.
  User: LT
  Date: 2018-11-27
  Time: 8:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <jsp:include page="${pageContext.request.contextPath}/commen/commen.jsp"></jsp:include>
</head>
<body>
<!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
<div id="main" style="width:700px;height:600px;"></div>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    $.post("/xiaoshou/queryjingban",function (data) {
    myChart.setOption({
        title: {
            text: '按销售人员统计'
        },
        tooltip: {},
        legend: {
            data:['单数']
        },
        toolbox: {
            show : true,
            feature : {

                dataView : {show: true, readOnly: false},
                magicType : {
                    show: true,
                    type: [],
                    option: {
                        funnel: {
                            x: '25%',
                            width: '50%',
                            funnelAlign: 'left',
                            max: 1548
                        }
                    }
                },
                restore : {show: true},
                saveAsImage : {show: true}
            }
        },
        xAxis: {
            data: data.ren
        },
        yAxis: {},
        series: [{
            name: '单数',
            type: 'bar',
            data: data.ren1
        }]
    })
    })

</script>

</body>
</html>
